#include <SFML/Graphics.hpp>
#include "include/Generalites.h"
#include "include/Keyboard_Manager.h"


int main()
{
    std::cout << "the master";

    Jeu* gJeu = new Jeu();
    Keyboard_Manager* gKeyboard = new Keyboard_Manager(gJeu);

    sf::RenderWindow* app = gJeu->GetApp();

    app->SetFramerateLimit(60);
   // test


   const char* Ikillthesegmentation("/home/juliensud/ryukishin/dialogue");


   gJeu->Get_Gui().GetDialogue().setdialogue(Ikillthesegmentation);
   //std::cout << gJeu->Get_Gui().GetDialogue().Get_Texte();


   unsigned int  ao = 1;
    gJeu->Get_Gui().GetDialogue().preparation(ao);


    while (app->IsOpened())
    {



        if (gKeyboard->Check_Pressed(sf::Key::Escape))
        app->Close();


        float ElapsedTime = app->GetFrameTime(); // On récupère le temps depuis le dernier affichage pour update les anims

        gJeu->Update(ElapsedTime);

        gJeu->Draw();
    }



    return EXIT_SUCCESS;
}
